import { numberFormat } from "@/util/util.js";
export const tableOptionDetail = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  header: false,
  editBtn: true,
  delBtn: true,
  column: [
    {
      type: "input",
      label: "唯一标识",
      prop: "id",
      hide: true,
      editDisplay: false,
    },
    {
      type: "input",
      label: "主表关联ID",
      prop: "relationId",
      hide: true
    }, {
      "type": "input",
      "label": "线路编码，不能重复",
      "prop": "lineCode",
      hide: true,
    }, {
      "type": "input",
      "label": "车站编码，不能重复",
      "prop": "stationCode",
      hide: true,
    },
    {
      label: "票种",
      prop: "ticketType",
      search: false,
      width: 140,
      type: "select",
      dicUrl: "/support/swpmticketcardtype/dict/DCP",
      props: {
        label: "mainName",
        value: "mainEnName"
      },
      rules: [
        {
          required: true,
          message: "请选择票种",
          trigger: "blur"
        }
      ],
      cell: true
    },
    {
      type: "select",
      label: "设备编号",
      prop: "equipmentCode",
      cell: true,
      dicUrl: "/support/swpminternetticketequipmentcode/page",
      props: {
        label: "equipmentCode",
        value: "equipmentCode",
        res: "data.records"
      },
      filterable: true
    },
    {
      type: "input",
      label: "设备名称",
      prop: "equipmentName",
      hide: true
    },
    {
      type: "number",
      label: "发售数量（张）",
      prop: "saleNumber",
      cell: true
    },
    {
      type: "number",
      label: "小计金额",
      prop: "totalSaleAmount",
      precision: 2,
      cell: true
    },
    {
      type: "input",
      label: "部门ID",
      prop: "deptId",
      hide: true
    },
    {
      type: "input",
      label: "创建人ID",
      prop: "creatorId",
      hide: true
    },
    {
      type: "input",
      label: "创建人名称",
      prop: "creatorName",
      hide: true
    },
    {
      type: "input",
      label: "创建时间",
      prop: "createTime",
      hide: true
    },
    {
      type: "input",
      label: "数据更新时间",
      prop: "updateTime",
      hide: true
    },
    {
      type: "input",
      label: "删除标志 1：删除 0：未删",
      prop: "delFlag",
      hide: true
    }
  ]
};

export const tableOptionDetailAdd = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  header: false,
  editBtn: true,
  delBtn: true,
  column: [
    {
      type: "input",
      label: "唯一标识",
      prop: "id",
      hide: true,
      editDisplay: false,
    },
    {
      type: "input",
      label: "主表关联ID",
      prop: "relationId",
      hide: true
    }, {
      "type": "input",
      "label": "线路编码，不能重复",
      "prop": "lineCode",
      hide: true,
    }, {
      "type": "input",
      "label": "车站编码，不能重复",
      "prop": "stationCode",
      hide: true,
    },
    {
      label: "票种",
      prop: "ticketType",
      search: false,
      width: 140,
      type: "select",
      dicUrl: "/support/swpmticketcardtype/dict/DCP",
      props: {
        label: "mainName",
        value: "mainEnName"
      },
      rules: [
        {
          required: true,
          message: "请选择票种",
          trigger: "blur"
        }
      ],
      cell: true
    },
    {
      type: "select",
      label: "设备编号",
      prop: "equipmentCode",
      cell: true,
      dicUrl: "/support/swpminternetticketequipmentcode/equipmentCodeOfUsing",
      props: {
        label: "equipmentCode",
        value: "equipmentCode",
        res: "data"
      },
      filterable: true
    },
    {
      type: "input",
      label: "设备名称",
      prop: "equipmentName",
      hide: true
    },
    {
      type: "number",
      label: "发售数量（张）",
      prop: "saleNumber",
      cell: true
    },
    {
      type: "number",
      label: "小计金额",
      prop: "totalSaleAmount",
      precision: 2,
      cell: true
    },
    {
      type: "input",
      label: "部门ID",
      prop: "deptId",
      hide: true
    },
    {
      type: "input",
      label: "创建人ID",
      prop: "creatorId",
      hide: true
    },
    {
      type: "input",
      label: "创建人名称",
      prop: "creatorName",
      hide: true
    },
    {
      type: "input",
      label: "创建时间",
      prop: "createTime",
      hide: true
    },
    {
      type: "input",
      label: "数据更新时间",
      prop: "updateTime",
      hide: true
    },
    {
      type: "input",
      label: "删除标志 1：删除 0：未删",
      prop: "delFlag",
      hide: true
    }
  ]
};
